package com.common.base;

/**
* @version: V1.0
* @author: szw
* @className: BaseEnum
* @packageName: BaseEnum
* @description: 公共枚举类
* @data: 2021-1-19 
**/ 
public enum BaseEnum {
    //系统默认
    SYSTEM_NORMAL("0", "系统正常"),
    SERVICE_ERROR("-1", "服务异常"),
    SUCESS("1", "成功"),
    NO_AUTHORITY("2", "无权访问"),
    JEDIS_HOST_TO_URL_IS_NULL("3","找不到redis配置"),

    ID_IS_NULL("4","ID为空"),
    FIND_PARAMETER_IS_NULL("5","查询条件为空"),

    //订单状态- 预约
    ORDER_STATUS_Y("20","0"),
    //订单状态- 未完成
    ORDER_STATUS_N("21","1"),
    //订单状态- 进行中
    ORDER_STATUS_NOW("22","2"),
    //订单状态- 完成
    ORDER_STATUS_OK("23","3"),
    //订单状态- 订单取消
    ORDER_STATUS_CANCEL("23","4"),

    //预约状态- 预约
    MAKE_STATUS_Y("24","0"),
    //预约状态- 预约成功
    MAKE_STATUS_N("25","1"),
    //预约状态- 预约失败
    MAKE_STATUS_NOW("26","2"),
    //预约状态- 预约完成
    MAKE_STATUS_OK("27","3"),
    //预约状态- 预约取消
    MAKE_STATUS_CANCEL("28","4"),

    //日志操作类型
    UNKNOWN("unknown","系统"),
    DELETE("delete","删除"),
    SELECT("select","查询"),
    UPDATE("update","更新"),
    INSERT("insert","保存"),
    LOGIN("login","登录"),
    LOGIN_OUT("login","登出"),
    UPDATE_OR_SAVE("saveOrUpdate","新增或修改"),
    SYNC("sync","同步处理数据"),
    ASYNC("async","异步处理数据"),

    //用户相关
    TOKEN_IS_NULL("98","无token，请重新登录"),
    DATA_IS_NULL("99","操作数据为空"),
    PASSWORD_KEY("isyskey", "密码生成key"),
    DEFAULT_PASSWORD("123654", "默认密码"),
    INIT_ROLE_REDIS_KEY("YS:INIT:ROLE:DATA:ALL", "初始化角色信息到Redis，key"),
    INIT_DICT_REDIS_KEY("YS:INIT:DICT:DATA:ALL", "初始化字典信息到Redis，key"),
    INIT_DICT_LEADERBOARD_KEY("YS:INIT:LEADERBOARD:DATA:ALL", "初始化排行榜信息到Redis，key"),
    DEFAULT_ROLE("DEFAULT_ROLE", "普通用户"),
    ADMIN_ROLE("ADMIN_ROLE", "管理员"),
    ADMIN("ADMIN", "管理员"),
    DICT_COMMODITY_CLOTHES("COMMODITY_CLOTHES", "旧衣物回收规则积分数"),

    //业务枚举从这里开始
    ADD_USER_ERROR("100","新增用户失败"),
    ADD_ROLE_ERROR("101","新增角色信息失败"),
    ADD_USER_ROLE_INTO_ERROR("102","操作用户角色信息失败"),
    ADD_USER_NAME_ERROR("103","用户名或登录名已存在"),
    ADD_USER_INFO_IS_NULL("106","用户信息为空"),
    UPDATE_USER_INFO_ERROR("107","更新用户信息失败"),
    DELETE_USER_ERROR("108","删除用户信息失败"),
    USER_ID_IS_NULL("109","用户id为空"),
    SELECT_USER_ERROR("110","查询用户信息失败"),
    UPDATE_ROLE_ERROR("111","更新角色信息失败"),
    DELETE_ROLE_ERROR("112","删除角色信息失败"),
    FIND_ROLE_ERROR("113","查询角色信息失败"),
    USER_IS_NULL("114","用户不存在"),
    USER_LOGIN_NAME_OR_PWD_IS_NULL("115","用户名或密码不能为空"),
    USER_LOGIN_NAME_OR_PWD_IS_ERROR("116","用户名或密码错误"),
    SAVE_DICT_DATA_IS_ERROR("117","保存字典失败"),
    UPDATE_DICT_DATA_IS_ERROR("118","更新字典失败"),
    DELETE_DICT_DATA_IS_ERROR("119","删除字典失败"),
    DICT_DATA_TYPE_CODE_IS_NULL("120","字典code不能为空"),
    DICT_DATA_TYPE_VALUE_IS_NULL("121","字典值不能为空"),
    DICT_DATA_IS_NULL("122","字典操作数据不能为空"),
    DICT_DATA_ID_IS_NULL("123","字典ID不能为空"),
    FIND_DICT_DATA_IS_ERROR("124","查询字典信息失败"),
    PROBLEM_DATA_IS_NULL("125","问题对象为空"),
    SAVE_PROBLEM_DATA_IS_ERROR("126","保存问题对象失败"),
    DELETE_PROBLEM_DATA_IS_ERROR("127","删除问题对象失败"),
    UPDATE_PROBLEM_DATA_IS_ERROR("128","更新问题对象失败"),
    FIND_PROBLEM_DATA_IS_ERROR("129","查询问题对象失败"),
    NOTICE_DATA_IS_NULL("130","公告对象为空"),
    SAVE_NOTICE_DATA_IS_ERROR("131","保存公告对象失败"),
    DELETE_NOTICE_DATA_IS_ERROR("132","删除公告对象失败"),
    UPDATE_NOTICE_DATA_IS_ERROR("133","更新公告对象失败"),
    FIND_NOTICE_DATA_IS_ERROR("134","查询公告对象失败"),
    FEED_DATA_IS_NULL("135","意见对象为空"),
    SAVE_FEED_DATA_IS_ERROR("136","保存意见对象失败"),
    DELETE_FEED_DATA_IS_ERROR("137","删除意见对象失败"),
    UPDATE_FEED_DATA_IS_ERROR("138","更新意见对象失败"),
    FIND_FEED_DATA_IS_ERROR("139","查询意见对象失败"),
    ORDER_DATA_IS_NULL("140","订单对象为空"),
    SAVE_ORDER_DATA_IS_ERROR("141","保存订单对象失败"),
    DELETE_ORDER_DATA_IS_ERROR("142","删除订单对象失败"),
    UPDATE_ORDER_DATA_IS_ERROR("143","更新订单对象失败"),
    FIND_ORDER_DATA_IS_ERROR("144","查询订单对象失败"),
    MAKE_DATA_IS_NULL("145","预约对象为空"),
    SAVE_MAKE_DATA_IS_ERROR("146","保存预约对象失败"),
    DELETE_MAKE_DATA_IS_ERROR("147","删除预约对象失败"),
    UPDATE_MAKE_DATA_IS_ERROR("148","更新预约对象失败"),
    FIND_MAKE_DATA_IS_ERROR("149","查询预约对象失败"),
    RANKING_DATA_IS_NULL("150","排行对象为空"),
    SAVE_RANKING_DATA_IS_ERROR("151","保存排行对象失败"),
    DELETE_RANKING_DATA_IS_ERROR("152","删除排行对象失败"),
    UPDATE_RANKING_DATA_IS_ERROR("153","更新排行对象失败"),
    FIND_USER_RANKING_DATA_IS_ERROR("154","查询用户排行数据失败"),
    FIND_RANKING_DATA_IS_ERROR("155","查询排行对象失败"),
    USER_CODE_DATA_IS_NULL("156","用户中心对象失败"),
    SAVE_USER_CODE_DATA_IS_ERROR("157","保存用户中心对象失败"),
    UPDATE_USER_CODE_DATA_IS_ERROR("158","更新用户中心失败"),
    FIND_USER_CODE_DATA_IS_ERROR("159","查询用户中心失败"),
    //文件上传 200 -250
    FILE_UPLOAD_IS_ERROR("200","文件上传异常"),
    FILE_UPLOAD_CREATED_IS_NULL("201","文件上传人为空"),
    FILE_FIND_IS_ERROR("203","文件查询失败"),
    FILE_DELETE_IS_ERROR("204","文件删除失败"),
    FILE_ID_IS_NULL("205","文件id为空"),
    FILE_INFO_IS_NULL("206","文件查询对象为空"),
    LOG_DATA_IS_NULL("207","系统日志操作对象为空"),
    SAVE_LOG_DATA_IS_ERROR("208","保存系统日志操作异常"),
    DELETE_LOG_DATA_IS_ERROR("209","删除系统日志异常"),
    FIND_LOG_DATA_IS_ERROR("210","查询系统日志异常"),
    DATA_CENTER_MES_IS_ERROR("211","数据中心处理消息失败"),
    DATA_CENTER_ERROR_MES_IS_ERROR("213","数据中心处理消息异常"),

    //消息相关
    MESSAGE_SEND_IS_ERROR("1000","消息发送异常"),
    SAVE_MESSAGE_IS_ERROR("1001","消息保存异常"),
    UPDATE_MESSAGE_IS_ERROR("1002","消息更新异常"),
    FIND_MESSAGE_IS_ERROR("1003","查询消息异常"),
    ;

    private String code;
    private String desc;

    BaseEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

}
